package com.feng.chat.mapper;

import com.feng.chat.entity.GroupMember;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 聊天群组成员表 Mapper 接口
 * </p>
 *
 * @author dyf
 * @since 2022-05-31
 */
public interface GroupMemberMapper extends BaseMapper<GroupMember> {

    /**
     * 获取群成员id
     * @param group_id
     * @return
     */
    @Select("SELECT user_id FROM group_member WHERE group_id=#{group_id} AND is_quit=0")
    public List<Integer> getGroupMember(Integer group_id);
}
